package demo.Test;
import java.util.Scanner;

public class Test {

    public static boolean func(int j) {
        for(int i = 2; i < j; i++) {
            if(j%i==0) {
                //不是素数返回假
                return false;
            }
        }
        return true;
    }

    //找到1~n之间的素数
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String ret = " ";
        int n = in.nextInt();
        for(int j = 1; j <= n; j++) {
            if(func(j)){
                ret+=j;
                if(j!=n) {
                    ret+=",";
                }
            }
        }
        System.out.println(ret);
    }
}
